<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
	th:with="title='绠＄悊涓績',active='home'">
<header th:replace="admin/header::headerFragment(${title},${active})"></header>
<body class="fixed-left">
	<div id="wrapper">
		<div th:replace="admin/header::header-body"></div>
		<div class="content-page">
			<div class="content">
				<div class="container">
					<div class="row">
						<div class="col-sm-12">
							<h4 class="page-title">控制表盘</h4>
						</div>

						<div class="row">
							<div class="col-sm-6 col-lg-3">
								<div class="mini-stat clearfix bx-shadow bg-info">
									<span class="mini-stat-icon"><i
										class="fa fa-quote-right" aria-hidden="true"></i></span>
									<div class="mini-stat-info text-right">
										已发布<span class="counter" th:text="${articles}"></span>篇文章
									</div>
								</div>
							</div>

							<div class="col-sm-6 col-lg-3">
								<div class="mini-stat clearfix bg-success bx-shadow">
									<span class="mini-stat-icon"><i
										class="fa fa-cloud-upload" aria-hidden="true"></i></span>
									<div class="mini-stat-info text-right">
										已获得<span class="counter" th:text="${articleComments}"></span>条评论
									</div>
								</div>
							</div>

							<div class="col-sm-6 col-lg-3">
								<div class="mini-stat clearfix bg-primary bx-shadow">
									<span class="mini-stat-icon"><i class="fa fa-link"
										aria-hidden="true"></i></span>
									<div class="mini-stat-info text-right">
										已发布<span class="counter" th:text="${categories}"></span>类文章
									</div>
								</div>
							</div>
						</div>

						<div class="row">
							<div class="col-md-4">
								<div class="panel panel-default">
									<div class="panel-heading">
										<h4 class="panel-title">文章列表(只显示最新的6条)</h4>
									</div>
									<div class="panel-body">
										<ul class="list-group">
											<li class="list-group-item"
												th:each="article : ${articleList}"><span
												class="badge badge-primary" th:title="${article.title}+' '"
												th:text="${article.viewnum}"></span> <a target="_blank"
												th:href="@{~/blog/read.html(id=${article.id})}"
												th:text="${article.title}"></a></li>
										</ul>
									</div>
								</div>
							</div>
							<div class="col-md-4">
								<div class="panel panel-default">
									<div class="panel-heading">
										<h4 class="panel-title">最新评论(只显示最新的5条)</h4>
									</div>
									<div class="panel-body">
										<div th:if="${articleComments}== null ">
											<div class="alert alert-warning">???</div>
										</div>
										<ul class="list-group"
											th:unless="${articleComments}==null ==0">
											<li class="list-group-item"
												th:each="comment : ${articleCommentList}">
												<div th:if="${comment.id}!=null and ${comment.content}!=''">
													<a target="_blank" th:text="${comment.content}"></a>
												</div> <th:block th:if="${comment.commentUserId}==1" />admin<th:block /><a
												target="_blank"></a>
											</li>
										</ul>
									</div>
								</div>
							</div>
							<div class="row">
								<div class="col-md-4">
									<div class="panel panel-default">
										<div class="panel-heading">
											<h4 class="panel-title">文章分类</h4>
										</div>
										<div class="panel-body">
											<ul class="list-group">
												<li class="list-group-item"
													th:each="categories : ${categoryList}"><a
													target="_blank" th:text="${categories.category}"
													></a></li>
											</ul>
										</div>
									</div>
								</div>
							</div>
						</div>
						<div th:replace="admin/footer :: footer-content"></div>
					</div>
				</div>
			</div>
		</div>
		<div th:replace="admin/footer :: footer"></div>
</body>
</html>